// <copyright file="IGraphicsManager.cs" company="TenneySoftware">
// Copyright (c) 2009 All Right Reserved
// </copyright>
// <author>Robert Tenney</author>
// <email>rob10e@yahoo.com</email>
// <date>April 2009</date>
// <summary>Interface for graphics manager modules.</summary>

// License:

// Product: RPGRoguelikeEngine .Net
// Author: Robert N. Tenney
// Copyright: April 2009

// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation version 2
// of the License.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

// This license covers all source code, binaries, and other materials related to this project
// unless specifically stated otherwise.

using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;

using TenneySoftware.Engine;
using TenneySoftware.LevelGenerator;

namespace TenneySoftware.Engine.GraphicsManager {
    /// <summary>
    /// Interface for graphics manager modules.
    /// </summary>
    public interface IGraphicsManager {
        /// <summary>
        /// Gets the name associated with this module.
        /// </summary>
        /// <value>
        /// The name associated with this module.
        /// </value>
        string ModuleName {
            get;
        }
        
        /// <summary>
        /// Gets the description associated with this module.
        /// </summary>
        /// <value>
        /// The description associated with this module.
        /// </value>
        string ModuleDescription {
            get;
        }
        
        /// <summary>
        /// Gets the type of screen this module will draw onto.
        /// </summary>
        /// <value>
        /// The type of screen this module will draw onto.
        /// </value>
        string ModuleDisplaySurface {
            get;
        }
        
        /// <summary>
        /// Gets a value indicating whether or not the images have been generated.
        /// </summary>
        /// <value>
        /// A value indicating whether or not the images have been generated.
        /// </value>
        bool Generated {
            get;
        }
        
        /// <summary>
        /// Gets or sets the mode for centering.
        /// </summary>
        /// <value>
        /// The mode for centering.
        /// </value>
        CenteringMode CenteringModeUsed {
            get;
            set;
        }
        
        /// <summary>
        /// Gets the active tile as defined by SetActiveTile.
        /// </summary>
        /// <value>
        /// The active tile as defined by SetActiveTile.
        /// </value>
        Point ActiveTile {
            get;
        }
        
        /// <summary>
        /// Gets a value indicating whether or not to use FOV/FOW information during drawing.
        /// </summary>
        /// <value>
        /// A value indicating whether or not to use FOV/FOW information during drawing.
        /// </value>
        bool DoFieldOfView {
            get;
        }
        
        /// <summary>
        /// Gets a value indicating whether the level view is the currently active display.
        /// </summary>
        /// <value>
        /// A value indicating whether the level view is the currently active display.
        /// </value>
        bool LevelDisplayActive {
            get;
        }

        /// <summary>
        /// Gets or sets the tile size for drawing tiles on the level display.
        /// </summary>
        /// <value>
        /// The tile size for drawing tiles on the level display.
        /// </value>
        Size TileSizeLevel {
            get;
            set;
        }
        
        /// <summary>
        /// Gets or sets the tile size for drawing tiles on the map display.
        /// </summary>
        /// <value>
        /// The tile size for drawing tiles on the map display.
        /// </value>
        Size TileSizeMap {
            get;
            set;
        }
        
        /// <summary>
        /// Gets or sets the RPG engine to interact with.
        /// </summary>
        /// <value>
        /// The RPG engine to interact with.
        /// </value>
        RPGEngine Engine {
            get;
            set;
        }
        
        /// <summary>
        /// Gets the frame rate.
        /// </summary>
        /// <value>
        /// The frame rate.
        /// </value>
        int FrameRate {
            get;
        }

        /// <summary>
        /// Gets or sets the standard messages to display on the screen.
        /// </summary>
        /// <value>
        /// The standard messages to display on the screen.
        /// </value>
        string Message {
            get;
            set;
        }

        /// <summary>
        /// Dispose of all objects created by this manager.
        /// </summary>
        void Dispose();
        
        /// <summary>
        /// Resets the manager.
        /// </summary>
        void Reset();
        
        /// <summary>
        /// Calling this method will cause all the images to be redrawn, ignoring any flags to skip a cell or tile that
        /// does not require redrawing.
        /// </summary>
        void Invalidate();
        
        /// <summary>
        /// Sets the device to perform drawing functions onto.
        /// </summary>
        /// <param name="displayDevice">Display device.</param>
        void SetGraphicsDevice(object displayDevice);
        
        /// <summary>
        /// Causes updating of images. This will read any changes made and if there are changes, it will redraw the image. The
        /// screen updating is done only within the given frame rate.
        /// </summary>
        void Update();
        
        /// <summary>
        /// Toggles between level view and map view.
        /// </summary>
        void ToggleDisplay();
        
        /// <summary>
        /// Sets the active tile. The location can be given in either tile location or screen location. If the location is
        /// a screen location then the following bool needs to be set to true, otherwise it needs to be set to false.
        /// </summary>
        /// <param name="location">Location to set as active tile.</param>
        /// <param name="screen">True if the location given was from the display's location, or false if it is a tile's location.
        /// </param>
        void SetActiveTile(Point location, bool screen);
        
        /// <summary>
        /// Offsets the level and map images by the given point value. This is cumulative.
        /// </summary>
        /// <param name="offset">Point to offset images.</param>
        void OffsetDisplay(Point offset);
    }
}
